slavonic / odt2md Goto Github PK
View Code? Open in Web Editor NEWConvert LibreOffice document to Church Slavonic flavor of Markdown
Convert LibreOffice document to Church Slavonic flavor of Markdown
I am trying to convert some English Menaion files using ODT2MD. I get an error message:
Traceback (most recent call last):
File "/home/sasha/.local/bin/odt2md", line 11, in <module>
sys.exit(main())
File "/home/sasha/.local/lib/python3.6/site-packages/odt2md/odt2md.py", line 52, in main
odt2md(args.input, args.output, profile=args.profile, max_line_width=args.max_line_width)
File "/home/sasha/.local/lib/python3.6/site-packages/odt2md/odt2md.py", line 19, in odt2md
markdown_text = styler.format_md(blocks)
File "/home/sasha/.local/lib/python3.6/site-packages/odt2md/styler.py", line 137, in format_md
for b in blocks:
File "/home/sasha/.local/lib/python3.6/site-packages/odt2md/block.py", line 211, in parse_odt
yield from parse_blocks(para)
File "/home/sasha/.local/lib/python3.6/site-packages/odt2md/block.py", line 46, in parse_blocks
yield from extract_spans(ev.scan(para), para_style)
File "/home/sasha/.local/lib/python3.6/site-packages/odt2md/block.py", line 98, in extract_spans
assert False, e['tag']
AssertionError: {urn:oasis:names:tc:opendocument:xmlns:text:1.0}toc-mark
The odt2md conversion puts additional line breaks (see enclosed files, after мольба́ми, and after ꙗ҆́кѡ да).
Is this a bug or a feature?
@typiconman Пока odt2md
обрабатывает только классические сноски:
Сноска содержит уникальный символ, идентифицирующий сноску. Тело сноски может иметь несколько параграфов. Ссылка изображается суперскриптом. Такие ссылки
поддерживаются в Common Markdown и в ODT представлены явно через элемент note
.
Нужно понять как в ODT кодируются ЦСЯ сноски (сноски с кавыками). И надо придумать и обкатать Markdown синтаксис для них.
Пока вот такое примерно определение ЦСЯ сноски:
Пункт 3 весьма проблематичен для HTML и MD, так как страниц тут нет...
Хотелось бы набрать побольше примеров ЦСЯ сносок, чтобы подтвердить 1-2-3 и
придумать как их изящно закодировать...
I get a strange error when I try to convert the attached file:
WARNING:root:Undefined style name: 'C1'
WARNING:root:Undefined style name: 'lesson'
WARNING:root:Undefined style name: 'Standard'
Traceback (most recent call last):
File "/home/sasha/.local/bin/odt2md", line 11, in <module>
sys.exit(main())
File "/home/sasha/.local/lib/python3.6/site-packages/odt2md/odt2md.py", line 52, in main
odt2md(args.input, args.output, profile=args.profile, max_line_width=args.max_line_width)
File "/home/sasha/.local/lib/python3.6/site-packages/odt2md/odt2md.py", line 19, in odt2md
markdown_text = styler.format_md(blocks)
File "/home/sasha/.local/lib/python3.6/site-packages/odt2md/styler.py", line 137, in format_md
for b in blocks:
File "/home/sasha/.local/lib/python3.6/site-packages/odt2md/block.py", line 224, in parse_odt
yield from parse_blocks(para)
File "/home/sasha/.local/lib/python3.6/site-packages/odt2md/block.py", line 46, in parse_blocks
yield from extract_spans(ev.scan(para), para_style)
File "/home/sasha/.local/lib/python3.6/site-packages/odt2md/block.py", line 98, in extract_spans
assert False, e['tag']
AssertionError: {urn:oasis:names:tc:opendocument:xmlns:text:1.0}bookmark-start
Something having to do with bookmarks?
out.odt.zip
Any text or images placed in a section is ignored.
The workaround for that is to get rid of sections in the ODT document: (in LibreOffice) Format -> Sections -> Remove.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.