identifier for each entry
we need to know where each entry begins, then we can work in the anki integration
This commit is contained in:
parent
e48caa4c4b
commit
e9ddba49f0
|
@ -3,15 +3,26 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
int prevseen = 0;
|
||||
static char *buf = NULL;
|
||||
static size_t size = 0;
|
||||
long n = 1;
|
||||
while(getline(&buf, &size, stdin) > 0)
|
||||
{
|
||||
if (n++ < 5) /* overflow possible */
|
||||
if (n++ < 5)
|
||||
continue;
|
||||
if (strncmp(buf,"-->", 3) == 0)
|
||||
putchar('\n');
|
||||
{
|
||||
if (!prevseen)
|
||||
{
|
||||
prevseen = 1;
|
||||
putchar('\n');
|
||||
}
|
||||
else
|
||||
{
|
||||
prevseen = 0;
|
||||
}
|
||||
}
|
||||
else if (buf[0] != 10)
|
||||
fputs(buf, stdout);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue