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

ability to build html from chm source removed? #16

Closed
juliantaylor opened this issue Jan 29, 2020 · 0 comments
Closed

ability to build html from chm source removed? #16

juliantaylor opened this issue Jan 29, 2020 · 0 comments

Comments

@juliantaylor
Copy link

Hello,
with archmage version 0.3.1 you used to be able to create html files not only from a compiled chm but also from its source.
For example I used to build the html helm from following chm source files:
https://salsa.debian.org/dotnet-team/keepass2/tree/master/Docs
With:

import archmod.CHM
archmod.CHM.CHMDir("Docs").process_templates("Docs/Chm")

It appears this does not work anymore in the version 0.4.1:

import archmage.CHM;
archmage.CHM.CHMFile("Docs")

Traceback (most recent call last):
  File "test.py", line 3, in <module>
    archmage.CHM.CHMFile("Docs")
  File "/usr/lib/python3/dist-packages/archmage/CHM.py", line 71, in __init__
    self.topicstree = self.topics()
  File "/usr/lib/python3/dist-packages/archmage/CHM.py", line 143, in topics
    self.cache['topics'] = self._topics()
  File "/usr/lib/python3/dist-packages/archmage/CHM.py", line 147, in _topics
    for e in self.entries():
  File "/usr/lib/python3/dist-packages/archmage/CHM.py", line 81, in entries
    self.cache['entries'] = self._entries()
  File "/usr/lib/python3/dist-packages/archmage/CHM.py", line 92, in _entries
    if chmlib.chm_enumerate(self._chm, chmlib.CHM_ENUMERATE_ALL, get_name, out) == 0:
  File "/usr/lib/python3/dist-packages/chm/chmlib.py", line 44, in chm_enumerate
    return _chmlib.chm_enumerate(h, what, enumerator, context)
ValueError: Expected valid chmlib object

This is not mentioned in the NEWS file, was this feature intentionally removed?

juliantaylor added a commit to juliantaylor/archmage that referenced this issue Feb 9, 2020
add back the ability to export htlm files from chm templates via:

    python3 -c 'import archmage.CHM; archmage.CHM.CHMFile("chmdir").process_templates("output")'

Closes dottedmaggh-16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant