Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing issue to read from file in confluence_publish_allowlist #835

Closed
Rakesh201180 opened this issue Aug 9, 2023 · 2 comments
Closed
Labels
bug Something that needs to be fixed
Milestone

Comments

@Rakesh201180
Copy link

Rakesh201180 commented Aug 9, 2023

Hi Team,

I am facing issue to read from file when I am trying this option in conf.py to publish required documents.

Its not reading document names from file .

confluence_publish_allowlist = 'allowed-docs.txt'

image
allowed-docs.txt structure is like that

Test1/KB/doc1 Test1/KB/doc2 Test1/KB/doc3 Test1/KB/doc4 Test1/KB/doc5 Test1/Test1

but when I am putting those in below format in cong.py file its reading those file

confluence_publish_allowlist = ['Test1/KB/doc1', 'Test1/KB/doc2', 'Test1/KB/doc3', 'Test1/KB/doc4', 'Test1/KB/doc5', 'Test1/Test1']

I tried multiple things (with hardcoded path and all) but its not taking values from file.

Need suggestions here

Thanks in advance

@jdknight jdknight added the bug Something that needs to be fixed label Aug 11, 2023
@jdknight jdknight added this to the 2.3 milestone Aug 11, 2023
@jdknight
Copy link
Member

There appears to be issues with the implementation, which may be resolved in the recent changes introduced in #838. If interested, you may try to use the development version of this extension to see if it resolves your issue.

Alternatively, if you would like to keep using an official release, you could possibly workaround this scenario by providing an absolute path to the allow list. For example:

import os
doc_dir = os.path.dirname(os.path.realpath(__file__))
confluence_publish_allowlist = os.path.join(doc_dir, 'allowed-docs.txt')

@jdknight jdknight added the available-next-release Merged into the main branch but waiting for PyPI release label Aug 19, 2023
@jdknight
Copy link
Member

jdknight commented Sep 9, 2023

v2.3 is now available on PyPI -- marking as closed.

@jdknight jdknight closed this as completed Sep 9, 2023
@jdknight jdknight removed the available-next-release Merged into the main branch but waiting for PyPI release label Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that needs to be fixed
Projects
None yet
Development

No branches or pull requests

2 participants