Giter Club home page Giter Club logo

obsidian42-text-transporter's Introduction

Text Transporter - advanced text management for Obsidian

Text Transporter is the Swiss Army Knife of text manipulation plugins for Obsidian that allows you to modify contents of files in your vault, even when the file is not visible. In addition Text Transporter provides a number of convenient functions for quickly selecting lines, blocks and more, along with quickly creating block references.

Text Transporter will make you a text ninja! Text Transporter is made with extra heart for keyboard lovers!

Learn more about Text Transporter: https://tfthacker.com/transporter or follow me at https://twitter.com/tfthacker for updates.

Help with Text Transporter

There are a number of new requests in the Issues database. If you are interested in helping expand the functionality of Text Transporter, please take a look at the Issues database and see if there is something you can help with. I am always looking for Pull Requests to help improve Text Transporter from the community.

Other things

You might also be interested in a few products I have made for Obsidian:

  • Canvas Candy - The Canvas Candy Vault is a set of tools specially designed for use with the canvas feature of Obsidian. With over 40+ decorations, you can add new dimensions to the cards on your canvas.
  • Cornell Notes Learning Vault - This vault teaches you how to use the Cornell Note-Taking System in your Obsidian vault. It includes learning material, samples, and Obsidian configuration files to enable Cornell Notes in your vault.

obsidian42-text-transporter's People

Contributors

bwydoogh avatar channingwalton avatar edjw avatar evelf avatar tfthacker 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  avatar  avatar

obsidian42-text-transporter's Issues

Bookmark not recognized

I've tried various ways to describe a file - I.e., how much of a path to provide, but I'm not having much luck. I'm attaching two screenshots - the first shows my current attempt at describing a bookmark for the file scratchpad.md. The second shows the files that are presented when using Quick Capture. How should I describe this file so that the Bookmark feature recognizes it as a Bookmark?

Screen Shot 2021-09-27 at 1 01PM

Screen Shot 2021-09-27 at 1 11PM

[FR] Display Text Transporter options on search results

Thanks for all the work on this plugin, pretty great to work with. I'd like to suggest being able to explore the plugins options upon right-click over results of a query. Right now you can drag-and-drop results from a query inside a note to the note itself but it will only add the link to the note where the search results are located. Drag and drop will be insane, but TT options will be awesome. Thanks!

Text Transporter Commands

I'm obviously confusing myself with the number of options that your plugin offers - and my attempt to translate them into what I'm used to seeing in Roam. My latest issue is with accessing the commands themselves with the Command Menu. The first screenshot displays what I see when I look for "text" and the second what is displayed with the All Commands option. Is that the intended functionality?

Screen Shot 2021-09-20 at 8 39AM

Screen Shot 2021-09-20 at 8 39AM 1

Feature Request: Replace link with text respects block and heading references

Currently using the replace link with text on a link like this [[articles_Research Recitation - GitHub Docs#242142330]] does nothing. It would be great if it pulled that heading, or block embed. Another solution could be to make the pull lines from another file command automatically select the file your cursor is on, and preferably the header.

Feature Request: Use Template when transporting text or links

the plugin could have a setting for adding prefixes/suffixes to text/links transported. For example like this

image

To allow your some flexibility, you could make the use of the template dependent of a modifier key similar to how the quick switcher works, e.g.

  • press return → works as normal
  • press cmd + return → uses the template defined in the settings
  • (with an option in the settings to turn it around for people you would like to use the template by default)

For the implementation, I think using different template settings for links, block refs, and pure text could also make sense.

a bunch of feedback on the beta

Here a bunch of smaller issues I discovered while testing

feature feedback

  • the "all commands" commands is a great idea, some other plugins would benefit from doing something like this
  • I am not sure what the usecase for "select previous block" would be, when you already have "select current block" and "expand to previous/next block"? If there is no usecase, you could maybe ditch those to reduce the number of commands?
  • I do not really like the implementation of the pull/push/copy commands. Selecting a note, selecting a beginning line, selecting an ending line... It feels a bit tedious, and I got the impression that working with copy/cut-paste and two panes would be quicker than doing it with this plugin. The "bookmarks" setting is a nice solution to speed up the selection of a note – maybe you could just use a value defined in the options (top of the file, bottom of the file, etc) to skip the selection of beginning/ending lines and so on? Like I press only one hotkey, select out of my 5 bookmarked notes, and the current line gets simply appended/prepended.
  • I get that bookmark+TOP/ BOTTOM does something similar, but I believe it feels a bit counterintuitive. And also means that until you use the plugin with some bookmarks, it would feel tedious. I dunno. Maybe just having a list of all lines is a bit too much, and having TOP/BOTTOM/Headers as options would reduce the tediousness a bit?

wording

  • "copy block as block as block reference" is phrased a bit weird. I'd expect sth like "Copy embedded block reference"?
  • is there a reason it is called "select current line", but also "select next block"? Confuses me a bit, since I'd expect something like "next line" and "current block" as well then. (I never really understood the difference between lines and blocks in Obsidian, tbh.)
  • it only becomes clear upon testing that "copy block as block as block reference" and "Add block ref ID's to selection and Copy them to clipboard" do the same thing. Maybe it could also be phrased as "line/selection" as the other commands?
  • I think the "Alias Indicator" in the settings should rather be called "Alias Placeholder", if I am not misunderstanding the feature?
  • is it necessary to add ; to the end of every bookmark line, when not using TOP/BOTTOM/Heading? (add some info on that?)

Otherwise, as far as I can tell from testing this plugin a bit, I didn't encounter any bugs. (But I also could not test all features, since I do not use daily notes, for example.)

Searching Files doesn't display bookmarks

Not sure whether it's a bug or intentionally implemented this way, but if I am searching for a file to send stuff to, the bookmarks disappear as soon as I type something into the suggester.

As I have about 30 bookmarks, I would very much like to "search" through my bookmarks in the suggester, but that isn't possible right now.

This is the same suggester, before and after typing just one letter:
Screenshot 2021-11-01 23 12 46
Screenshot 2021-11-01 23 12 59

Push/pull text to a destination note and leave block embed in source note in single step

Hello TfTHacker, thank you for creating this plugin. It really makes the job of moving data around Obsidian really easy and the overall experience of Obsidian more enjoyable. I am no longer worried about having to decide between atomic notes vs long DNPs (like I was used to in Roam), I feel like I can be flexible and decide what to do at the moment I am capturing the info, because I have such a powerful tool like Text Transporter!!

Having said that, I would request an additional feature - if possible.
Currently, I can push (or pull) text, or push (or pull) a block embed to/from another note.
I would also like the ability to push text to a destination note and simultaneously leave a block ref or embed of that in the source note. (Or conversely, pull text and leave behind a block ref in the original note).

To explain - Suppose I have 2 notes - Note 1 and Note 2. In Note 1 I have "SomeText". Right now I can only push either "SomeText" to Note 2 or push the Block Embed of "SomeText" to Note 2. I would like the ability to push "SomeText" to Note 2 and leave behind a Block Ref/Block Embed of that in Note 1 in a single step.
I can of course push "SomeText" to Note 2 and then pull the Block Embed of that back into Note 1, but that would need me to execute 2 steps, instead of 1.
Or am I missing something?

Another feature that would be great, is the ability to push text into a note that is yet to be created. Maybe I will create a separate issue for that.

Feature Request: Select everything underneath a heading

I would love to have a command that selects all text that "belongs" to a particular heading. For example, an H1 select command would locate the nearest previous H1 and select everything between that H1 and the next H1.

My primary use case is that I often create an H1 on a DNP and then take use an H1 on a DNP and take a fair amount of notes underneath it. I then usually want to move those notes to their proper place -- and being able to quickly select the entire section would save a lot of time.

on install: "failure to handle plugin manifest"

error message:

raw.githubuserconten…ain/manifest.json:1 Failed to load resource: the server responded with a status of 404 ()
app.js:1 
XMLHttpRequest
onabort: null
onerror: ƒ (e)
onload: ƒ ()
onloadend: null
onloadstart: null
onprogress: null
onreadystatechange: null
ontimeout: null
readyState: 4
response: "404: Not Found"
responseText: "404: Not Found"
responseType: ""
responseURL: "https://raw.githubusercontent.com/TfTHacker/obsidian-text-transporter/main/manifest.json"
responseXML: null
status: 404
statusText: ""
timeout: 0
upload: XMLHttpRequestUpload {onloadstart: null, onprogress: null, onabort: null, onerror: null, onload: null, …}
withCredentials: false
__proto__: XMLHttpRequest

Version number

In the Obsidian plug-in settings, and in the manifest.json file the version is shown as 1.0.5 , yet on your Github page it is shown as 0.6 Beta.

Thank You + Feature Request: Select Active Word ...

Hello @TfTHacker !!!!

I just watched your Demo video and I’m thrilled !

Since I’m a keyboard lover, this plugin is gonna be a game changer for my workflow. Thank you so much for your hard work to bring this features to our community !!!!!

I follow you on twitter too and I wanna take this FR as an opportunity to say thank you for sharing your knowledge with us.

My Feature Request is based on the beginning of your Demo when you showed powerful hotkeys to deal you Select Current Line

  • Select Current Line
  • Select Current Line and expand up into previous block
  • Select Current Line and expand up into next block

Is it feasible to do the same feature to the current word ?

  • Select Current Word
  • Select Current Word and expand up into previous word
  • Select Current Word and expand down into next word

I’m excited about this: Keep pressing the hotkey for Select Current Word selects the next word

My Ideia for this FR

Since I use emphasize text a lot (bold, italic, highlight, and some customizable tags) would be much more pleasant to use this hotkey instead of shift+arrows to select words then apply the decoration.

  • I think I’m gonna use shift+right arrow and shift+left arrow as hotkeys for this new commands :)

Thank you for your reading this and for your time. I hope you like my suggestion :)

  • Let me know if you need more information

I wish you a fantastic day!

Feature Request: Copy page link as an alias

There is already a command called "Copy block embeds as an alias (CA)". I propose a new command called "Copy page link as an alias" which essentially does the same thing but instead of copying the link to a block, it links to the page.

i.e. the output would be:

[[name of copied page|*]]

This would be useful as a sort of alternative to footnote links. In other words, a link reference can be added to a particular sentence.

For example,

"Author made claim X.*" - hovering over the star reveals the page content of the reference.

[FR] Support weekly/periodic note

It would be nice if you added some keywords to support the weekly note like DNPTODAY for daily notes (and other notes introduced by the periodic notes plugins).

Quick Capture handling of selected text

Summary: would like the Quick Capture feature to handle selected text the same as when editing markdown in Obsidian.

Steps to replicate:

  1. Initiate Quick Capture
  2. Type some text
  3. Select a portion of the typed text
  4. Press * to make selected text italic (emphasis) or ** to make selected text bold (strong)

Expected outcome: selected text is emphasis or strong

Actual outcome: text is overwritten

This also applies to emphasis, strong, strikethrough, code, and ==highlighted==

Ability to customize the block reference string

I used to write the block reference string as ^ff followed by three random numbers, so that when I refer to my notes later, I can just type ^ff to find the paragraph that was marked.
Your plugin is very good, it's good to improve the efficiency of applying paragraphs, but the generated block reference string is currently random.
So it is recommended to add a setting that allows me to customize the two characters at the beginning of the block reference and still keep it random afterwards, so that it is convenient for quick recall in the future.

Feature Request: Push to *same* file

Maybe this sounds like a stupid request or there's a better way of doing this, but I frequently want to move lines or blocks between headings within a note, and when the note is long enough that this requires a lot of scrolling it gets pretty inconvenient

Is there a way to show the current note in the list when choosing where to push?
Open to modifying files myself if there's a check I can disable or something

Feature Request: "Copy link to block from this selection" WITHOUT embed (!)

I use the "copy block embeds from the is selection" all the time:
image

But I've found myself going back and deleting the ! in front of the link a LOT. For example: I take ![[Goals+Planning#^thbkcs]] and delete the ! from the front to make it: [[Goals+Planning#^thbkcs]]

Sometimes I just want the link but not the embed.

Can we get a "Copy link to block from this selection" option?

Embed More than One Block

If I select two blocks and then the command:

Copy block embed as an alias

only the last block selected is copied. Is that intended?

[Discussion] Bookmarks for directories

Hello @TfTHacker and friends!

Little Question: is it possible to define an Folder (directory or subdirectory) as a Bookmark?

  • I read the Bookmarks description, but I think I did something wrong.

For a specific project I was thinking about define a Folder as a Bookmark to have a subset of Notes to choose when transport text instead a specific Note.

Thanks and have a great day!

[Feedback] Show Line numbers in file suggested and more bookmark commands

Hello again @TfTHacker !

Here is my feedback related to the Bookmarks Feature on release 0.6.1

From my user test, every feature works as expected :)

I have a few comments about new features that could be added to make the Bookmarks Feature even more powerful.

Select Line from File - Visual Line Numbers

Would be great for the user to have the line number on the left side while selecting the line from a file

Just an visual feature, but would help a lot for notes with more than 100 lines.

New Insertion Points

It is extreme powerful the ability to transfer text to another file without having to open the file.

  • This way, the most important thing is to help the user to place the text the way that is needed for the user workflow.

TOP BOTTOM # are amazing but I think we could have more insertion points!

a- ON TEXT CURSOR:: text will be inserted on the excatly position of the text cursor on the destination file

  • (text cursor+ paste)

b- LINE BREAK + ON TEXT CURSOR:: text will be inserted one line below the text cursor position on the destination file

  • (text cursor+ /n + paste)

c- BOTTOM + NEXT LINE: text will be inserted on the next line after BOTTOM on the destination file

  • (end of the note + /n + paste)

d- LINE BREAK + TOP: text will be inserted on first line then a new line (empty) will be created on the destination file

  • (start of the note + paste + /n)

Additional Idea: one good idea could be the option to have as many line breaks /n as possible

  • This way the user could define, for example, define two line breaks after placing text on the TOP of the note.

Let me know if you want me to open an FR for one of the Features described above.

Have a great day!

Feature request: match list type

I'd love to be able to use this plugin with my Kanban boards, but Quick Capture and pushing links or embeds (e.g. to current file) doesn't work with Kanban because it expects list items or tasks.

So, it would be very helpful if, when inserting text into a file, this plugin detected that it was adding to the start or end of an Obsidian list or task list, and formatted the inserted item(s) accordingly. This would save some extra typing in the case of Quick Capture, and would allow pushing links or embeds to Kanban boards. (Of the two, link/embed handling is probably higher priority, since the QC issue can be worked around by adding list marker(s), but there is no such workaround for links and embed.)

Cant Append Quick Capture to a note

Please provide an option to append the quick capture note the end of the note .

now only option available is to prepend ie to the capture the note to the top of the file

Thank you so much

The plugin is so useful

Block references

Perhaps I'm looking for more Roamery than I should be, but is there a way to:

a. Select multiple blocks
b. Copy references to them
c. Paste (or push) those references to a new file
d. Convert all of them to text and alias at once

Feature request: "Bidirectional" Pushing of Block Reference

I was very happy to see you linking this plugin in Discord, as I have been tinkering with Templater to achieve something similar. I am not sure what would be the proper name for it, but what I was trying to accomplish some sort of "bidirectional linking command" – to push an embedded block reference to a target note, but also leave a link to the target note at the end of the block of the current note. (probably easier to show via code than to explain it, so I attached the relevant part of the templater script.)

Linking this way is actually quite useful, as it allows to replicate the so called "coding" of qualitative analysis software like atlas.ti or MAXQDA. This would get Obsidian a big step closer to the idea of being used as qualitative analysis software, as described by @ryanjamurphy in this blog post.

As your plugin is already very close to what my Templater Script is trying to achieve, could you maybe add this sort of "bidirectional" linking to this plugin's features? It wouldn't be just a "nice-to-have" feature, but rather a feature for which there already is a very real use case.

<%*
// set delimiter Icon for meta-information at the end of a block
const delimiter = "♦︎";

// the search scope is restricted to notes beginning with the string set here.
const filterString = "°";

// select target note
var targetNote = await tp.system.suggester((item) => item.path, this.app.vault.getMarkdownFiles().filter(file => file.name.startsWith(filterString)), true);

// select & get current Block
let cmEditorAct = this.app.workspace.activeLeaf.view.editor;
const curLine = cmEditorAct.getCursor().line;
cmEditorAct.setSelection({ line: curLine, ch: 0 }, { line: curLine, ch: 9999 });
let blockText = tp.file.selection();

//Create link to target note
let targetNoteLink = "[[" + targetNote.name.replace (/\.md$/,"") + "]]";

//function to create block-ID
function createBlockHash() {
   let result = '';
   var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
   var charactersLength = characters.length;
   for ( var i = 0; i < 8; i++ ) {
       result += characters.charAt(Math.floor(Math.random() * charactersLength));
   }
   return result;
}

// Check whether block already has already been referenced
// append accordingly to source note
let blockIDExists = (blockText.match(/\^\w*$/) != null)
if (blockIDExists == true){
   var id = blockText.match(/\^\w*$/)[0];
   tR = blockText.split(delimiter)[0] + delimiter + blockText.split(delimiter)[1] + targetNoteLink + " " + delimiter + " " + id + "\n";
} else {
   var id = "^" + createBlockHash();
   tR = blockText + " " + delimiter + " " + targetNoteLink + " " + delimiter + " " + `${id}`;
}

// write to target note
let blockRef = `![[${tp.file.title}#${id}]]`;
const curContent = await this.app.vault.read(targetNote);
let newContents = curContent + "**" + tp.file.title + "** " + blockRef + "\n\n";
await this.app.vault.modify(targetNote, newContents);
%>

Push text into note that is not yet created and needs to be created

Currently when I push text, I can push it to an existing note.

It would be great if I can get the ability to

  • (1) create a new Note or
  • (2) Create an existing note (in the sense that only the links of the existing note exists, the note is not yet physically created ) - here a feature like show existing files only or uncreated files as well as an option like in Quick Switcher core plugin would be nice

while pushing the text.

I guess, the point 1 can be done with the Note Refactor plugin, but would be nice to have this through the same Text Transporter plugin

Feature request: preset a note, to which to push blocks

for example, to move completed tasks from a current note, to an "archive" note:

  • preset a specific note as a constant "archive" note
  • open a new note, and select a few blocks in this current note
  • push / move selected blocks from current note, to the beginning or end (optional) of that preset archive note

the above could be automated as follows:

  • a command to scan current note for all done tasks, push/move them all to the archive note. or specify another attribute to scan for, like a certain tag in that block

thanks.

Ability to push just the link of the line/selection to a file

Hello! We talk the other day in the forum. :)

It would be great to have the option to do a “Push line/selection to another file as a link” in order to have just the link/connection to that line/selection without the embebed content.

Thanks for this amazing plugin!

[Bug] `ABI` Command vs `CC` Command (Release 0.7.0)

Hello @TfTHacker !!!

I think I find a bug: the ABI command have the same result as CC

If I understood correctly the definition of CC and ABI:

  • CC -> ![[Filename#^BlockRef]] (embed link)
  • ABI -> [[Filename#^BlockRef]] (not embed link)

On 0.7.0 we have CC and ABI as ![[Filename#BlockRef]] for both commands.

Sorry if I understood incorrectly the commands.

Have a great day!

Support navigating to the desired line/block before deciding copying/moving/linking

When sending a line from the current note, Note A, to another note, note B, one may already know beforehand whether to copy, move or block link the line in Note A to Note B. However, it may not always be the case when trying to pull a line from Note B to Note A.

For instance, there can be the following use case:

  • One may remember vaguely there is some keyword in Note B, and one wants to insert the block link of the line with the keyword into Note A.
    • For this, one can use the command "Pull Line(s) from another file as block embeds
      (LLB)".
  • However, when navigating to the line in Note B, one may realize that the line containing the keyword is actually a note link.
    • Therefore, one may want to copy the note link rather than the block link to the line with the keyword.
  • In this case, one may need to use another command and do this again, or open Note B and manually copy the note link.

To resolve the issue above, it would be great if there can be a command to navigate the desired line in Note B first, and then decide whether to copy, move or link the line.

⌘+L only works for current line

I have assigned hotkey ⌘+L to select current line. In the video you say that if you keep pressing ⌘+L it will keep selecting successive lines, but that does not work. ⌘+L only works for the current line, repressing the hotkey does not do anything.

I don't see a command to select previous line, which you have assigned ⌘+⇧+L to.

Am I missing something?

Feature Request: Send Heading References

Similar to Send link of current note to a file and Send link of current note to the Clipboard it would be great to also have Send Heading Link to another file and Send heading link to the clipboard

(I personally use heading references rather than block references.)

Aliases do not work for PLT. Create files for PLT not yet a function.

It would be wonderful to use the PLT function (or similar) also with the aliases of a note (sometimes one remembers an alias of a note, but not the note name). This would match the "Type file to switch or create"!

Also it would be great to be able to push content to files not even created yet!

Suggestion: More Consistent Command Names

I think the two send commands and the two push basically do the same thing, don't they?

If I am not wrong, then I'd suggest to name all for of them Push for consistency.

Screenshot 2021-11-01 23 05 03


Furthermore, in one case it's "Send to clipboard", while in another two it's "copy". These, too, could be named consistently. (Slight overlap with the point above for the last command.)

Screenshot 2021-11-01 23 07 12

Screenshot 2021-11-01 23 08 36

Quick capture input for RTL

Issue: Quick capture text box starts on the left for RTL languages.

Feature Request: To start on the right for RTL languages

Context: Used for journalling in different languages

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.