Comments (9)
Oh, sorry about that. The lack of complaints have made me forget about fixing this. I'll make it a priority to update this now!
from wiki.vim.
I created a pull-request #22
from wiki.vim.
Ok, I've pushed a first version. I think the updated docs should be easily understandable. Let me know what you think.
from wiki.vim.
I'll look at the issue with the bad buffer filename. Could you give me the output when you do e.g. echo wiki#date#get_week('2019-03-13')
? I suspect there might be something wrong here. If the output is strange, please next try date +%V -d 2019-03-13
in a terminal. Also, it would be interesting to see the output of date --version
.
from wiki.vim.
echo wiki#date#get_week('2019-03-13')
date: illegal time format
> date +%V -d 2019-03-13
date: illegal time format
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
date --version
does not work, but in the manpage I see, that it is the BSD implementation (Macbook). On a Linux machine it works.
To get the weeknumber from a given date in BSD, apparently you have to use:
$ date -j -f '%Y-%m-%d' '2019-03-13' +%V
11
Which does not work on my Linux machine anymore...
(apparently others already had simmilar problems https://stackoverflow.com/questions/8747845/how-can-i-detect-bsd-vs-gnu-version-of-date-in-shell-script)
from wiki.vim.
Sorry about the delay. I've tried to add the BSD syntax as a fallback. Let me know if it works.
from wiki.vim.
Seems to work 👍
from wiki.vim.
Hmm, unfortunately not.
Now wiki#date#get_week('2019-03-13')
works, but when I open a journal entry outside of the current directory and call WikiJournalToWeek
, it creates a file with the name journal/Use_wFailed conversion of "journal/2019-03-08'' using format "%Y-%m-%d''.wiki
. It looks a bit as if the get_week()
function is called with the filepath as argument.
When cd into the journal directory, open the journal in that directory and call WikiJournalToWeek
, I get the following Error:
Error detected while processing function wiki#buffer#init[22]..<SNR>136_apply_template[8]..wiki#template#weekly_summary[7]..wiki#date#get_week_dates:
line 15:
E687: Less targets than List items
from wiki.vim.
Ah, I assume it is because there are more calls to date
. If you look in the function ...#get_week_dates
you see it has 4 calls (two in each conditional block).
In general, the entire date.vim
module has a strict dependency on the date
util.
The following calls are made and works on Linux:
# In "get_day_of_week"
date +%u -d 2019-03-21
# In get_next_weekday
date +%F -d "2019-03-21 +1 day"
# In get_week_dates
date +%u -d 2019-03-21
date +%F -d "2019-03-21 n days"
date +"%V %u" -d 2019-03-21
Here I've inserted "2019-03-21" for the input date. The +%u
should give the day of the week (1 for Monday, 2 for Tuesday, and so on). So, it would help if I could get the corresponding date commands for BSD.
from wiki.vim.
Related Issues (20)
- citekey: link to BibDesk (in wiki.vim too) [feature request] HOT 27
- Feature Request: Auto-Copy Text for WikiLinkFollow HOT 10
- Default keybinds not loading when attempting to use `adoc` HOT 3
- How can I avoid affecting certain default templates of wiki.vim HOT 3
- Possible to use one prefix to delimit a line of tags? HOT 3
- WikITocGenerate for more filetypes HOT 3
- WikiJournalNext / WikiJournalPrev navigate out of journal folder HOT 7
- Backlinks don't update immediately HOT 16
- WikiExport: cmd should use double quote under windows HOT 18
- How can g:wiki_export be configured to support HTML, docx, and PDF? HOT 4
- Using custom resolver breaks WikiJournalNext/WikiJournalPrev HOT 10
- Disabling default mappings might be broken HOT 2
- Provide dictionaries containing default mappings HOT 6
- Enhancement request for WikiJournalIndex: reverse order and update HOT 3
- Is it possible for wiki-link-types to support jumping to Vim help? HOT 7
- WikiTags can't work under gvim 9.1 or neovim 0.10 + win 10 pro HOT 19
- Infinite loop on template rendering if function starts at index 0 in template file HOT 1
- HTML text objects are overwritten by text objects for link texts HOT 3
- WikiLinkAdd in visual mode HOT 3
- Add completion source for `:WikiOpen`
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 wiki.vim.