Giter Site home page Giter Site logo

mcndt / noteshare.space Goto Github PK

View Code? Open in Web Editor NEW
190.0 190.0 17.0 1.79 MB

A service for sharing encrypted Markdown notes from Obsidian. Notes are end-to-end-encrypted and are only stored temporarily.

Home Page: https://noteshare.space

License: MIT License

JavaScript 2.52% TypeScript 58.84% Svelte 35.81% Dockerfile 1.31% CSS 0.49% HTML 1.04%

noteshare.space's People

Contributors

mcndt 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

noteshare.space's Issues

[Bug] Checkbox child indentation doesn't work properly

Checkboxes with hierarchy by indentation aren't rendered properly:
image

To Reproduce
The source text for the screenshot above:

- [ ] checkbox 1
	- [ ] child checkbox 1
	- [ ] child checkbox 2
- [ ] checkbox 2
	- [ ] child checkbox 3
	- [ ] child checkbox 4

[Bug] Inline footnotes are not rendered

Currently inline footnotes are not rendered correctly. See the discussion from #24:

Yes, it is an inline footnote. Like^[this is a footnote] which shows at the
foot of the rendered file with an ordinal and the text. See
https://help.obsidian.md/How+to/Format+your+notes

You can also use inline footnotes. ^[notice that the carat goes outside of
the brackets on this one.]

On Fri, Sep 9, 2022 at 4:53 PM Maxime Cannoodt @.***>
wrote:

So sorry for my late response, I have been traveling.

I am unfamiliar with this footnote syntax. Is it a way to define the
footnote text inline? I was previously only familiar with this syntax:

This is a paragraph^[1].

[1]: This is the footnote text, which will be rendered at the bottom of the page.


Reply to this email directly, view it on GitHub
#24 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAXFR3XNZE4KQCMY5H4SLLDV5OPTFANCNFSM57IF3PZA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Originally posted by @stoweboyd in #24 (comment)

[Feature request] Allow download of additional formats

Is your feature request related to a problem? Please describe.
Sharing notes with non technical audiences where markdown is not widely adopted makes it complex for recipients to reuse the notes.

Describe the solution you'd like
Make it possible to download more formats on the page of the note alongside markdown.

It could be done through an optional local pandoc implementation uploading additional files along with the markdown.

[Feature request] Transparency of ops expenses

This is a lovely idea. It is very generous of you to offer it freely to the community!

Would you be willing to write a small doc describing the monetary and personal costs of operating this service?

As a dev, I'm well aware that there's often a lot more that goes into a service than just writing it and deploying a docker image. Not asking for humble brags: just for you to get the recognition and, ideally, deserves community support.

Cheers!

[Bug] codeblocks with an unregistered language tag render as "undefined"

Describe the bug
codeblocks with an unregistered language tag render as "undefined" because Highlight.js throws an exception.

To Reproduce
Steps to reproduce the behavior:

Expected behavior

  • The codeblock renders without syntax highlighting

Screenshots

e.g.

```dataview
LIST FROM [[]] AND -(outgoing([[]]))
```

renders as:

image

Environment (please complete the following information):

  • All

Additional context
Add any other context about the problem here.

[Feature request] Option to give css file style (basicaly to support RTL)

Is your feature request related to a problem? Please describe.
I share text in Heb but in the quick share the css style + RTL class is not export as well so text is show from Left to right , and i got mention that is not confinet for the readers

Describe the solution you'd like
upload css files along with the note and respect cssclases or list of attributes that go up with the note

[Bug] Inline Links to headings are not functional

Hi Maxine,

enjoy your service to share docs with the small circle of my reading group.
Trying to make a content section with live-links to some headings in the text below doesn't seem to work.
Link Syntax [[Anuruddha - Sāriputta#With Anuruddha (2nd) / Sujato]] -> this is rendered as faint blue text but not live.
Since all the external links are working beautifully I thought this might be more of a bug rather than a feature reqeust...
Thanks for looking into it.

  • OS: macOS 12.6.1
  • Browser Opera / Vivaldi / Safari
  • Version 1.01

Screenshot.pdf
Happy to send a link to the document if this is helpful.

[Feature request] Omit displaying of 1st markdown header if identical with filename

Is your feature request related to a problem? Please describe.
For many Markdown users it is very common to have a 1st header that is identical with the filename.
There is even an Obsidian plugin to achieve this (Filename Heading Sync) and you can achieve this also using the Template and the Templatr plugin.
Noteshare will then display the same text twice - first the file title then the first Markdown heading. This is a bit annoying and looks unprofessional when I use Noteshare.

Describe the solution you'd like

  1. If after frontmatter properties and empty lines there is no text in front of the first header
  2. then do a simple comparison of file title and the 1st Markdown heading
  3. Omit displaying of either file title or first header if equal
    Nobody will miss the double text line if it isn't there. The raw markdown would be unaffected, I think this is a win-win situation for every case.

Describe alternatives you've considered
Behavior could be configurable, but this adds usage complexity and the above heuristic solves the problem in a silent and elegant way.

Additional context
DoubleHeadline

Rendering Footnotes

It would be good if footnotes were rendered in the copied file.

In my use case, I write comments and place tags and other annotations in footnotes, but for sharing with others those would be better at the foot of the rendered file.

[Feature request] Hope we can have an outline(or TOC)

Is your feature request related to a problem? Please describe.
In a long note, we may have a structured content inside.
Sometimes we can't clearly or remember where we are in this note.

Describe the solution you'd like
The most convenient and concise way is an outline, or TOC(Table Of Content) like this:
image

Describe alternatives you've considered
Nope.

Additional context
If we have a highlighted bar indicated which paragraph we are located, that would be a great plus.

[Feature request] Postgres support

Is your feature request related to a problem? Please describe.

I would love to host this in Kubernetes but have the workload stateless

Describe the solution you'd like

Support postgresql as a non-default option

Describe alternatives you've considered

Using your service.

Additional context
Add any other context or screenshots about the feature request here.

[Bug] Request failed, status 502

Describe the bug
When I try to publish a note on my server, I get Request failed, status 502

To Reproduce
Steps to reproduce the behavior:

  • Raise your noteshare service
  • Make sure that the UI is displayed
  • Try to publish any note

Expected behavior
I expected the note to be published. As a result, I get a Request failed, status 502

Screenshots

  • Provide a screenshot showing what is wrong.
  • If possible, share a note to noteshare.space and put the share link in this bug report so I can further debug the problem.

Environment (please complete the following information):

  • OS: MacOS
  • Browser safari
  • Version commit 655973a

Additional context
Here's what the backend container log shows

{"level":50,"time":1685293069276,"pid":1,"hostname":"noteshare-backend","msg":"Error: Unable to load Node-API Library from /app/node_modules/.prisma/client/libquery_engine-linux-musl.so.node, Library may be corrupt"}
/app/node_modules/@prisma/client/runtime/index.js:28837
      throw new PrismaClientInitializationError(message, this.client._clientVersion);
            ^

PrismaClientInitializationError: Unable to load Node-API Library from /app/node_modules/.prisma/client/libquery_engine-linux-musl.so.node, Library may be corrupt
    at RequestHandler.handleRequestError (/app/node_modules/@prisma/client/runtime/index.js:28837:13)
    at PrismaClient._getDmmf (/app/node_modules/@prisma/client/runtime/index.js:29845:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async PrismaClient._executeRequest (/app/node_modules/@prisma/client/runtime/index.js:29767:22)
    at async PrismaClient._request (/app/node_modules/@prisma/client/runtime/index.js:29738:16) {
  clientVersion: '4.2.0',
  errorCode: undefined
}

When building the backend, I changed the Dockerfile because it wasn't going without it. Added at the very beginning

RUN apk update
RUN apk add --no-cache libssl1.1

It seems that something is missing when building a backend.

[Feature request] collapsed callouts render the actual collapsing

Is your feature request related to a problem? Please describe.
Since I am trying to use noteshare to share reading notes with my friends, sometimes I want to fold up part of the content that may involve spoilers, so I am hoping that callouts can have actul collapsing.

Describe the solution you'd like
make callouts that have the "+" or "-" in them render like foldable callouts rendered natively in obsidian.

Additional context
image
image

[Feature request] Hide Obsidian Comments

Is your feature request related to a problem? Please describe.
I often use the Obsidian comment syntax to hide text that is only relevant to myself. Unfortunately, noteshare.space does not respect those comments and displays them as normal text.

Describe the solution you'd like
The rendered output of the document should not contain the comments. It is fine if the comments are present in the markdown mode.

Describe alternatives you've considered
Currently, I have to copy the document to the clipboard, manually remove the comments, share the document, and undo the changes.

Additional context

# Sandbox

This is a shared note on [[noteshare.space]]. %% TODO: expand this paragraph %%

Expected result:
grafik

Actual result:
grafik

[Bug] Math is rendered differently in noteshare when it's not in obsidian

Describe the bug
Math is rendered differently in obsidian vs noteshare.

I think it's to due with how Obsidian picks which $'s are math and which one's aren't. Seems like $'s with a space before them are not included as closings.

To Reproduce
Steps to reproduce the behavior:

  • But two Money values in the same line (I have $500, Kyle owes me $200)
  • Mix math and money

Expected behavior
Math equation selection and rendering should match that of obsidian.

Screenshots
image
Noteshare

Environment (please complete the following information):

  • Obsidian for Linux (Flatpak)
  • QuickShare version 1.3.1
  • Obsidian 1.3.4
  • Firefox 113.0.2 and Safari (whatever the latest is)

[Security] Static IV during encryption/decryption

Leaving notes on this repository as well (Originated from mcndt/obsidian-quickshare#21)


Came from https://mcndt.dev/posts/how-to-e2e-encryption/ 👋🏻

Describe the bug

Currently the code sets the IV to static value of 0s, and this is considered to be insecure.. Consider randomizing your IVs.

https://github.com/mcndt/obsidian-quickshare/blob/73733c0292cb3f0d6775c69c734e80c690932777/src/crypto/crypto.ts#L45-L49

const md = await window.crypto.subtle.decrypt(
{ name: 'AES-CBC', iv: new Uint8Array(16) },
await _getAesKey(secret),
ciphertext_buf
);
return new TextDecoder().decode(md);

Also, please consider reading https://security.stackexchange.com/a/17046 with regards to secure usage of AES-CBC on your service. I honestly think it's better off to do something with GCM than with CBC mode.

[Bug] Docker image for backend won't build

Describe the bug

The docker outputs this error:

------
 > [build_image 6/8] RUN npx prisma generate:
#0 5.585 Prisma schema loaded from prisma/schema.prisma
#0 7.555 Error: Get Config: Unable to establish a connection to query-engine-node-api library.
#0 7.555 Details: Unable to require(`/app/node_modules/prisma/libquery_engine-linux-musl.so.node`)
#0 7.555  Error loading shared library libssl.so.1.1: No such file or directory (needed by /app/node_modules/prisma/libquery_engine-linux-musl.so.node)
#0 7.555
#0 7.555 Prisma CLI Version : 4.2.0
------
failed to solve: process "/bin/sh -c npx prisma generate" did not complete successfully: exit code: 1                                                                                                    

I found this issue to be helpful: prisma/prisma#9624

I managed to build the image and spin up the project by changing BUILD_IMAGE to node:14.17.1-alpine, as suggested in one of the comments.

diff --git a/server/Dockerfile b/server/Dockerfile
index 34a14c0..80a753d 100644
--- a/server/Dockerfile
+++ b/server/Dockerfile
@@ -1,4 +1,4 @@
-FROM node:16-alpine AS BUILD_IMAGE
+FROM node:14.17.1-alpine AS BUILD_IMAGE
 
 
 # install dependencies
@@ -24,4 +24,4 @@ COPY --from=0 /app .
 ENV PORT 8080
 EXPOSE 8080
 
-CMD ["node", "./build/src/server.js"]
\ No newline at end of file
+CMD ["node", "./build/src/server.js"]

I find this strange, as that issue was marked as resolved back in 2021.

Environment (please complete the following information):

  • OS: VMware Photon OS 5.0
  • Docker 24.0.5 (docker version listing below)
Client:
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.12
 Git commit:        0ed913b8-
 Built:             07/28/2020 16:36:03
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          24.0.5
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.7
  Git commit:       a61e2b4
  Built:            Fri Aug  4 19:22:45 2023
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 crun:
  Version:          1.8
  GitCommit:        0356bf4aff9a133d655dc13b1d9ac9424706cac4
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

[Feature request] Own serverless deployment with CloudFlare workers

Is your feature request related to a problem? Please describe.
Hey, I'm quite a heavy PKM user and have been using Obsidian since ~ 2020; crossing my first one hundred thousand of words I came to the point sometimes, I need to share some thoughts with others pretty easily.

Yet I would like to see it shared in a custom way, maybe with different/own domain / deployment

Describe the solution you'd like
I saw deployment instructions and see it's not so trivial to run for oneself, even though I'm tech savvy person I can clearly say I don't have time to manage VPS :)
I would like to see noteshare leverage kind of serverless infrastructure with some KV storage for purpose storing just markdown files and some CSS customizations in some case.
Flow how I could anticipate could be people could have CloudFlare button to spin their own instance with Workers and Storage and voila. Later could be extended to use cf-r2 for media files?

For domain, doesn't matter now, CF provides workers and costs for hosting are free or close to cents for milion requests, doubt someone will make that much with notes?

Docs

First 100,000 requests each day are free and paid plans start at just $5 per 10 million requests.

For media files

Funding

I'm happy to back some portion of development costs as a small donation ($300?) to make this happen and probably be the first user.

I can be reached at https://t.me/yangwao

Describe alternatives you've considered
sekund has some styling iirc, but some sense bit overcomplicated?

Additional context

https://github.com/mcndt/noteshare.space#deployment

Currently, it runs on a VPS I rent for about 7$/month.
https://noteshare.space/funding
The storage requirements for hosting encrypted text data are incredible small; at the time of writing (28 September, 2022), Noteshare is storing 1,000 notes in a little over 7MB.

Quick share has already close to 4k downloads, I guess this could be an interesting extension to cut costs as they might be only growing quite.

[Bug] Shorthand strikethrough markdown not displayed properly

Describe the bug

Obsidian allows for a "shorter" strikethrough format where ~~ is only needed at the beginning of a line to strikethrough the entire line. noteshare.space does not seem to support this

To Reproduce

Create & share a note with the following text:

~~This is a test

Expected behavior

In Obsidian, this produces:

This is a test

Screenshots

Screenshot comparing Obsidian vs noteshare.space:

image

Environment (please complete the following information):

  • OS: Windows 11
  • Browser: Brave (latest)
  • Obsidian Version: 1.0.3

413 error on uploading note

Describe the bug

Error 413 when uploading a note : Request failed, status 413

To Reproduce

  • Write a 85587 character note and try to publish (Update : the size is not relevant)
    Failed.
  • Split in half and re publish : may succeed.
  • Unpublish, recover the full text and publich again : may succeed too.

Expected behavior
Published like any other note

Environment (please complete the following information):
Obsidian 1.1.16 / Quickshare 1.3.1

[Refactor] Migrate to SubtleCrypto

SubtleCrypto is a web standard and built into most browsers, offering better reliability and performance.

I see this as a blocking issue for image embedding.

[Bug] Markdown Parsing Error results in incorrectly formatted note - possible server-side arbitrary code execution

Describe the bug
The markdown entered, is not parsed correctly, resulting in poorly formatted text, including italics, missing spaces, and more. I suspect that dollar sign ($) is escaping characters in the markdown parser, and may be a potential vulnerability to executing server-side code execution of arbitrary code.

To Reproduce
Steps to reproduce the behavior:

  • Enter the following text in an Obsidian Note and share to notespace:
# Example
If my household's annual expenses to support our current lifestyle are (just picking a round number for simplicity) is $100,000, we then divide that by 0.04 (4%)[^2] and the result is $2.5 million. That's the target number. Once my household's net worth is $2.5M then we can retire. Of course, if you are willing to live on less in retirement than what you have now, you can reduce your target number eg if in retirement you can live on $35,000/y then the target number is $875k.

> ⚠ There is a lot of nuance and assumptions in the above, and I am not a financial advisor - so definitely do your own research and talk to people you trust.
  • View the notespace note. The above markdown gets rendered as:
    image

Expected behavior
The markdown should instead be rendered as:
image

Screenshots

Environment (please complete the following information):

  • OS: Windows10
  • Brave Browser v1.49.120

[Feature] Receive and store embedded images from users

Plugin

  • Check per-embed size before POST
  • Check total payload size before POST
  • GZIP json before POST

Server

  • Accept GZIP’ed JSON (+ unit test)
  • On WRITE NOTE event, log embed count & total size
  • on WRITE EMBED event, log embed size
  • Test storage of embeds up to 2MB
  • Test receiving of notes up to 8MB

Web

  • Generate list of embeds to find (+ unit test)
  • Generate embed_id from embed name (+ unit test)
  • Fetch embed ciphertext
  • Decrypt embed ciphertext (+ unit test)
  • Render image embeds (+ unit test?)

[Feature request] Updating published notes

Is your feature request related to a problem? Please describe.
Currently, when editing a note that you previously published (for example, when you shared a budget breakdown with a friend and they noticed an issue), you have to re-share the note, which also involves sending a new link to the share partner.

Describe the solution you'd like
A command named something like Updated shared note would be nice that, when invoked, updates the note at the location that the previous link was already pointing to.

It would be extra useful to have a feature that causes selected notes to be updated automatically whenever they change (or whenever they're saved to disk by Obsidian).

Thanks!

[Feature request] Footnotes?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

footnotes cannot be shown

Describe the solution you'd like
A clear and concise description of what you want to happen.

footnotes be shown

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[Bug] certain characters escape tag rendering

Originally posted in mcndt/obsidian-quickshare#6:

It seems ü and - among others break the rendering of tags:

image

Text in the picture:

> [!metadata]-
> - *status*:: draft
> - *source*:: [[2022-04-25 Pathologie Vorlesung]]
> - *tags*:: #krankheitsbild/entzündung #anatomie/darm 
> - *course*:: [[Pathologie]]
> - *review*:: #review/semester-5/pathologie 

### Epidemiologie

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.