Giter Site home page Giter Site logo

nicbou / markdown-notes Goto Github PK

View Code? Open in Web Editor NEW
106.0 5.0 12.0 2.58 MB

A note-taking application that supports Markdown, LaTeX and more. Not actively maintained.

Home Page: http://markdownnotes.com

License: Creative Commons Zero v1.0 Universal

Python 19.74% JavaScript 47.17% HTML 15.46% Shell 0.29% Dockerfile 0.15% SCSS 17.20%

markdown-notes's Introduction

Markdown Notes

This is the official repository for Markdown Notes.

Application overview

Markdown Notes is a note-taking application that uses Markdown and LaTeX. You can see the application on the Markdown Notes website.

Architecture overview

Markdown Notes is a Django application with an AngularJS front-end.

The back-end consists of a simple Tastypie API to serve the notes and a bunch of simple Django views to handle the front page and user management. File uploads are stored on Amazon S3.

The front-end consists of an AngularJS app that binds various libraries together. The front-end code can be found in /frontend.

Setting up the project

  1. Install all requirements with pip: pip install -r requirements.txt.
  2. Install the external libraries with bower install
  3. Rename markdown_notes/local_settings.py.template and update it with your own settings. Some values in settings.py need to be set in environment variables.
  4. Collect the static files with python manage.py collectstatic. When DEBUG = False, you will also need to call python manage.py compress.
  5. Create the database with python manage.py migrate.
  6. Run the server with python manage.py runserver.

Updating from a previous version

If you have forked this project in the past (before #42), you might need to generate API keys for existing users. If you get unexplained 403 and 404 while logging in with valid user accounts, this is likely the cause of your problem.

To backfill the API keys, enter the following command:

python manage.py backfill_api_keys

Deployment tools

A crude tool for automatic deployments is available. Install forever (npm install -g forever) and run forever start webhooks.js to have the server redeploy every time there is activity on the GitHub repo.

deploy.sh will pull code from the git repository, sync the database, collect static files and minimize them before restarting the server. It is used by webhooks.js, but can also be called manually.

Docker

You can also build your own docker image:

  1. Rename markdown_notes/local_settings.py.template and update it with your own settings. Some values in settings.py need to be set in environment variables.
  2. Run docker build -t markdown-notes .
  3. Run docker -p 8000:80 -d markdown-notes
  4. Open your browser at localhost:8000

Get involved

You can contribute to Markdown Notes by looking at the submitted issues and sending pull requests with your fixes.

markdown-notes's People

Contributors

auhau avatar dependabot[bot] avatar hermanzdosilovic avatar nicbou avatar ocelotsloth avatar tomhodson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

markdown-notes's Issues

Share button

The thing which I miss the most from the app is a simple share button, which would give me a link to share with colleges. Not for editing, only the preview.

Ability to search and tag notes

Hi,
I have just started using markdown-notes, I think it has a huge potential. But one feature that I would love to have in it would be the ability to tag the notes and search them according to their tags or content.

Drag and drop failing in Firefox

https://sentry.io/markdown-notes/markdown-notes/issues/193712264/

TypeError: e.dataTransfer.types.indexOf is not a function
  at isImageDrag (/static/CACHE/js/7b4c79cea920.js:1581:369)
  at onDragOver (/static/CACHE/js/7b4c79cea920.js:1581:520)
  at Sf (angular.js:3497:2)
  at func (angular.js:3485:8)

This is because Chrome returns an Array for dataTransfer.types while Firefox returns a DOMStringList.

This is fixed in Firefox 52, so I'm just keeping this ticket around for reference

https://www.fxsitecompat.com/en-CA/docs/2016/datatransfer-types-is-now-domstringlist-instead-of-array/

Notebook support

Is there a plan to support notebook(collections of notes) in markdownnotes.com?

BTW, is this project supported by any organization?

"Getting started" note for new users.

An introductory note should be created when the user signs up so they know how markdown works and what Markdown Notes can do. There are lots of hidden features and getting people to RTFM would lead to smarter, happier users.

Creating directories for the notes

I think one big important feature missing in the markdown-notes that I would appreciate to have a lot is the ability to create directories and grouping the notes according to these directories.

Spacing problems with multiple lists

The following markdown:

* 6 EL Honig
* 6 EL Sojasoße

* 1/2 Tasse geschnitten Frühlingszwiebeln
* 2 Karrotten, gerieben
* 1/2 Tasse Koriander
* 3/4 Tasse Erdnüsse

* 1/4 Pflanzenöl 
* 1/4 Sesamöl
* 1-2 EL Chiliflocken (1 ist genügend)
* 1 Box Linguine

Produces the following output:
screen shot 2016-10-12 at 11 28 52 pm

This is definitely a Marked bug, but I'm leaving this here as a reminder to update dependencies and see if that fixes the problem.

markedjs/marked#530

Complete the switch to SASS

Although the editor uses SASS, the rest of the site still has static CSS files. Switching to well-formatted SASS markup would be good.

django.conf.urls.patterns() is deprecated

When running with Django1.8 I get following message:

RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns

And when running with Django1.10:

ImportError: cannot import name patterns

I think you should update urls.py in your application, or fix Django version in requirements.txt. 😄

Automatically create a TOC for sections and subsections

It would be nice to be able to hide/show a table of content on the left of the page, at least in the Preview only mode.

Ideally, the TOC should be automatically generated from the sections and the subsections. Also, the depth of the TOC should be configurable (e.g. sections only, sections+subsctions, sections + sub + sub-subsections, ...) and/or it should be possible to tag the (sub)sections that should appear in the TOC.

Trim down the API response for updated notes

We currently return the full note every time a note is updated, while the frontend only need the sharing ID and the date. We could save quite a bit of bandwidth by trimming down the response to only include these fields.

multiline ``` text ```

First of all, Thank you for this project. I've found it's very useful but have some usability issues as for me.

In code mode (some multilines code) editor show multiline text as a one line. Screenshot linked.

http://joxi.net/Y2LpRgMsnX0Ba2

Fix the codemirror directive

The current directive comes from angular-ui. It needs to be updated to support the following features:

  • Clear Ctrl+Z history on note change
  • Properly change the model (sometimes the last character doesn't trigger an update) (angular-ui/ui-codemirror#93)

Add SSL to MarkdownNotes.com

Right now the communication (including the login page) goes over HTTP making it a serious security vulnerability

Add versioning

It would be amazing to have versioning, i.e. to have a history of each note and to be able to revert a note to a specific past version.
A way to implement it could be either to save a new version of each note whenever another note is opened and/or when the user leaves the website (e.g. when the session ends?) or to add a "Save" button and enforce the user to save the note before opening a new note or leaving the page (arguably not as comfortable as autosave).

This might be related to #2 as it makes a reference about the history of the note, so there might already be something similar to what I am proposing under the hood.

Paste to upload

It would be nice to be able to paste images (especially screenshots) rather than just upload them. There are no other markdown editors that support that at the moment, and it would be quite useful.

API documentation

Hey there,

I would suggest to create API documentation for example with https://apiary.io/. I used it on one of my projects and it is quiet nice way how to document and also test API (example from my project: http://docs.icalian.apiary.io/ ).

I want to work on the #6 issue so I will try to make the documentation after I will be finished.

TikZ package support

Is there a way to add TikZ package support to LaTex in my local copy of this software..?
Or Can you add that to the online version..?

Mobile app (including taking pictures)

Hey there!

I am using md-notes for note taking in school and sometimes I would really like to include photo of a slide. The drag&drop images into note is nice feature, but the process of taking the photo with my phone and then sending it to my computer is really uncomfortable and long.

I would therefore suggest to create a very simple mobile app, which would be just for taking pictures and uploading them on server. I imagine that it would work as follow.
User would login to the app (#6 will be needed for that), then would take the picture, choose to which note should be the picture associated with and upload the picture to server. After the picture is uploaded to server, the picture would appear in floating box next to the code window, so the user could place the photo into note. This would require to implement two-ways communication so the client side could be noticed about the new photos uploaded. I guess websockets would be in place for that...

What do you think about this idea?

backing up and moving to private server

Hi, I have a ton of notes in the web app, I noticed that it's not being mantained any more and I fear it might one day dissapear and take all my notes with it.

The notes I have are VERY important to me, and i would like to back them up on a regular basis or even move them to a server I controll.

Is there any way to do this?

Thanks for the aplication, it has changed the way i work and study and was/is a HUGE tool for me.

Multiple tabs open on the same note can cause data loss

Steps to reproduce:

  1. open a tab on a given note
  2. open another tab on the same note and make an edit
  3. go to the first tab and make an edit

The first edit will be lost, this has bitten me a couple of times.

I'm not sure what the simplest way to fix this is, but I suggest the frontend keeps track of the last time it has has saved to the server, and before it does another save it checks that the file hasn't updated in the meantime.

Alternatively, make the frontend pull down the server's copy of the note before it ever modifies it.

One-time news (notifications)

As development of markdown-notes continues and new features are added, we should think of some mechanism of notifying the old users about new features. The list of features is kept in the Getting started note, but that is generated only one time, when the user is registered, so they are not aware about any new features introduced after their registration (unless they follow this repo, which is very unlikely).

So I would propose one-time news, which are displayed to user only once after login or opening the editor (in case they have active Remember me login feature). Actually I would force them to confirm reading it, in the way of hitting closing cross, which would than send notification to server and the the news would be marked for them as read and never displayed again.

The news could be added either through admin section or through migrations.

Dragging and dropping images only works in Chrome

As reported by a user, the dragging and dropping of images only works in Chrome. Firefox and Safari do not fire the event or show the cursor. Dropping the image simply loads the image in the tab.

Note Preview does not appear when using HTTPS

The app is working correctly, but the preview does not appear. I've tested this and when using normal HTTP, it appears just fine.

My Apache configs read as follows:

<VirtualHost *:80>
    ServerName rs.naly.tech

    RewriteEngine On
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]

</VirtualHost>

SSL:

<VirtualHost *:443>
    ServerName rs.naly.tech

    SSLEngine on

    SSLCertificateFile /[Removed]/ssl.cert
    SSLCertificateKeyFile /[Removed]/priv.key
    SSLCertificateChainFile /[Removed]/cert.chain

    <Proxy *>
        Order allow,deny
        Allow from all
    </Proxy>
    ProxyPass / http://localhost:8000/
    ProxyPassReverse / http://localhost:8000/

</VirtualHost>

Is there a proper way to configure apache to use SSL with markdownnotes?

Problems with print stylesheets

Since the switch to SASS, some bugs appeared in the print stylesheet. The biggest is that the preview only takes half the page.

Support history in editor and browser

Right now, the note switching simply changes the content of the editor. Changing notes should push the new note to history to make the back button work, and Ctrl+Z should not clear the editor or put back the previous note in it.

Language specific code highlighting

Hi,

nice app, love it! I have a minor issue with the code highlighting. It seems to me, that it ignores the specified language and for example the following snipped is displayed ugly:

  val something = collection.reduce((u,v) => u+v).map("Result: "+ _)

and not at all like:

    val something = collection.reduce((u,v) => u+v).map("Result: "+ _)

Can you confirm it please, or it is just me missing something?

Export to PDF

Another feature which I think would be highly appreciated is exporting the Markdown file into PDF files.
Myself I was writing some exam essays on MD Notes and to submit it, I had to download the MD file and convert it with some online tool, like for example http://www.markdowntopdf.com/.

This would mean to implement two things on backend:

  1. Markdown-to-HTML conversion - for example with Python-Markdown (it will be necessary to compare output of marked.js and this package, to see if there are any major differences)
  2. PDF rendering of HTML code - I found two Python solutions - Reportlab and WeasyPrint

Inline LaTeX is cloned in the line below

The following example is not correctly parsed:
For some reason this is parsed correctly $$$Z_{1..5}$$$ but this is not $$X_{1..5}$$

The first LaTeX formula is as expected, but the output of the second one is repeated a second time in the line below resulting in something like this:

but this is not X1..5
                  X1..5

This is happening on Linux Ubuntu 14.04 kernel 3.17.0-031700-generic with Google Chrome 45.0.2454.85.

Log client-side errors

Markdown Notes is a mainly front-end application, and I never took the time to implement error logging for client-side errors.

I was thinking of adding Sentry error logging to the application to make it easier for us to spot front-end errors. It's free for < 150 000 events per month, which I hope suits a website with a few thousand users.

https://sentry.io/pricing/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.