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

Конвертер из ЦСЯ Markdown в #5

Open
4 tasks
0xGeorgii opened this issue May 10, 2019 · 12 comments
Open
4 tasks

Конвертер из ЦСЯ Markdown в #5

0xGeorgii opened this issue May 10, 2019 · 12 comments

Comments

@0xGeorgii
Copy link

  • HTML
  • LaTeX
  • XML
  • PDF?
@0xGeorgii
Copy link
Author

@pgmmpk @typiconman Can I mark HTML, LaTeX, XML as 'done' or they require more development?

@pgmmpk
Copy link
Contributor

pgmmpk commented May 11, 2019

pdf is irrelevant as it will be done via latex: md = > latex => pdf

@typiconman
Copy link

Can we run some tests MD -> XML -> MD and XML -> MD -> XML, to make sure the processes are lossless?

@0xGeorgii
Copy link
Author

we have some samples, maybe it makes sense to write some script. however, somebody should verify a result.

@pgmmpk
Copy link
Contributor

pgmmpk commented May 11, 2019 via email

@typiconman
Copy link

Wait, I though we already had a converter here.

Also, I think that we now have a lot of duplicated information in cumd and markdown-it-church-slavonic.

@pgmmpk
Copy link
Contributor

pgmmpk commented May 12, 2019

Thank you for the reminder - I forgot about existence of Python cumd, shame :/.

The MD=>XML part better be in JS (for the sake of VSCode). Maybe we need to port XML=>MD part to JS as well (so that we can unit-test the roundtrips).

Alternative would be to do the heavy lifting in Python, but integrate Python service into VSCode.

Lets brainstorm this - what the best way?

  1. Have JS for MD=>XML=>MD. Pros: easy to put into VSCode and on the web. Cons: can not be directly used from Python (i.e. nltk and other lang modeling tools, most of which are Python)

  2. Have Python MD=>XML=>MD. Pros: (see cons above), Cons: painful integration with VSCode

  3. Have both. Cons: hard to keep in-sync. One will need to be marked as "reference implementation", while other playing "catch-up".

My initial thoughts:

  • doing (3) is impractical as it duplicates the effort
  • do not have strong preference between (1) and (2). Python is easier for me personally, but that will require some research how to integrate with VSCode (its definitely possible, just need to learn the plumbing).

@typiconman
Copy link

As I understand it, our texts will be stored in MD. On the website, we will display them in HTML. So, we need MD -> HTML (trivial form of MD -> XML) in a method that can be easily automated on a server.

The other application will be our API, where a user can request a text in any format (MD, XML, LaTeX). Again, the conversion needs to be easily automated on a server.

@0xGeorgii
Copy link
Author

Conversion MD -> HTML is the MD's purpose. I don't see the reason why it's necessary to use py, what for?

@typiconman
Copy link

How do you store text as MD, but display HTML on a webpage for the user?

@0xGeorgii
Copy link
Author

@typiconman something like that. there are many libs for that

@0xGeorgii
Copy link
Author

Oh, the problem is in custom MD. I see. But there are only ~500 lines of code. Maybe it makes sense to re-write it on JS or TS?

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

No branches or pull requests

3 participants