Comments (11)
I'll take a look on Monday. You may be better if using a local database which is initialised using the 'init' subcommand though, which definitely uses relative paths. Take a look at 'tmsu help init'.
I'll remind myself what using -D does and get back to you though.
from tmsu.
Thanks. Using tmsu init
works, the paths are relative, I'm not sure why TMSU needs a whole new directory for the DB, though.
from tmsu.
@tsudoko
Although I can't personally comment on Paul's motivation, segregating data for different applications by putting them in their own directory seems to be the current convention.
It also means any future expansion will be cleaner, which personally I appreciate (I'm storing a file 'tagbuffers.json' in there myself, which tracks recently applied tagsets for quick reapplication through a GUI)
from tmsu.
The motivation for the directory was future extensibility. However I could
easily change it to not create the directory (but still support it if used).
Unfortunately I packed the wrong PSU this morning so have no laptop (the
battery is shot). I'll take a look at the absolute paths issue on Thursday.
On 5 Oct 2015 01:00, "0ion9" [email protected] wrote:
@tsudoko https://github.com/tsudoko
Although I can't personally comment on Paul's motivation, segregating data
for different applications by putting them in their own directory seems to
be the current convention.It also means any future expansion will be cleaner, which personally I
appreciate (I'm storing a file 'tagbuffers.json' in there myself, which
tracks recently applied tagsets for quick reapplication through a GUI)—
Reply to this email directly or view it on GitHub
#49 (comment).
from tmsu.
The current implementation will store paths relative to the database root (the directory in which the .tmsu
directory lives) providing:
- The file is under the database root.
- The files is one directory up from the database root.
In other cases the absolute path is used.
I can could change this, such that all paths are stored relatively, but it could lead to relative paths with a lot of ../../..
resolution going on, which I imagine could be a bit fragile.
Thoughts?
from tmsu.
Anybody have any input on how they would like paths to be stored for the default database?
Perhaps it is time we retired the concept of the default database altogether and use only databases created with the init
command?
from tmsu.
Perhaps it is time we retired the concept of the default database altogether and use only databases created with the init command?
cd /etc;tmsu tag foo bar
unless you are root, you would have to cd to a directory that has an init
ed db and then do tmsu tag /etc/foo bar
. But overall it'd make TMSU easier to understand.
Are there any people currently using TMSU who would have problems with such a simplification?
from tmsu.
OK, what I'll do then is this:
- Remove automatic creation of the default database.
- Add a message (to inform the user to run
init
) if no database can be found.
I'll preserve support for the default database though, so that existing databases continue to work and in case anyone wants to manually create one.
from tmsu.
@0ion9 In the case of permissions, it would be possible to create a database elsewhere and manually use it using the -D
option.
from tmsu.
@oniony
That's true, and suitable for aliasing if you want only one DB. If you want more than one DB, either writing a shell function or doing the workaround I specified seems more apt.
from tmsu.
Cool. I'll close this and raise a new ticket #55 .
from tmsu.
Related Issues (20)
- Pls consider making this tool available on conda HOT 1
- tmsu-fs-mv may overwrites files it cannot update internally HOT 4
- key-value tags will not work with rename HOT 5
- `tmsu tags --name=never` seems to imply `-1` HOT 1
- How can I delete values? HOT 4
- Need python example on how to import the tags for a file from a sqlite database into TMSU HOT 1
- Confusing status command behavior HOT 1
- ...
- Duplicated tags in file system HOT 1
- Repair files by automatically locating files based on checksum? HOT 2
- List all the tags with values HOT 11
- small contribution: sc-im interface for changing tmsu tags HOT 2
- Question: what does the error message mean? HOT 3
- --name=never removes lines HOT 2
- database locked occasionally
- VFS can be very slow
- Feature Request in VFS: Listing files outside of the `files` folder and hiding `queries` folder
- Cannot install TMSU HOT 1
- Package available in Void Linux
- too many SQL variables - transport endpoint is not connected when too many tag values exist
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmsu.