《刘大猫的财富之旅》

bookcover|200

字段 值
作者 '刘欣'
ISBN 9787516630532
出版年 2017-7
出版社 新华出版社
来源 刘大猫的财富之旅 (豆瓣)
评分 7.9
页码 239
分类 =this.file.etags
我的评级 =this.file.link.我的评级
书籍链接(外部) 刘大猫的财富之旅
书籍链接(内部) 刘大猫的财富之旅
内容简介

作者刘大猫是一名 90 后的互联网连环创业者,26 岁的他通过互联网创业收获到了财富,不仅仅是物质财富,还有认知的财富。
与其他创业类书籍不通的是,这本书非常真实,务实。书中没有任何大道理鸡汤,作者用平实的语言记录了创业以来遇到的种种事情,变化,困境,以及阶段性的成绩,记录了作者务实,鲜活的创业青春。

🗒️ 我的笔记

读书笔记

// dataviewjs: 根据读书笔记中是否存在“摘抄”部分的标题,选择不同渲染方式。若有摘抄部分,则只显示摘抄部分,否则显示页面封面内容。
(async () => {
  // 1. 获取书籍笔记库路径和书名变量
  const configPage = dv.pages(`#path`)
    .filter(p => String(p.file.path).includes("BookLibPath"))[0];
  if (!configPage) {
    dv.paragraph("⚠️ 未配置 `BookLibPath` 路径。");
    return;
  }
  const BookNotePath = configPage.BookNotePath;
  const rawBook = '刘大猫的财富之旅';
  const bookName = rawBook.replace(/^['"]+|['"]+$/g, "").trim();

  // 2. 查找匹配笔记
  const matching = dv.pages(`"${BookNotePath}"`)
    .filter(p => p.file.name.includes(bookName));

  if (matching.length === 0) {
    // 4a. 如果没有笔记
    dv.paragraph(`尚未创建《${bookName}》的读书笔记。`);
    return;
  }

  // 3. 选第一个匹配的笔记
  const note = matching[0];
  const path = note.file.path;
  const name = note.file.name;

  // 4. 读取文件、去除 frontmatter
  const file = app.vault.getAbstractFileByPath(path);
  let content = await app.vault.read(file);
  content = content.replace(/^---\r?\n[\s\S]*?\r?\n---/, "").trim();

  // 5. 提取 “摘抄” 节
  const lines = content.split('\n');
  let capture = false;
  const sect = [];
  for (const line of lines) {
    if (/^#{1,6}\s*摘抄\s*$/.test(line)) {
      capture = true;
      continue;
    }
    if (capture && /^#{1,6}\s*\S+/.test(line)) break;
    if (capture) sect.push(line);
  }
  const excerpt = sect.join('\n').trim();

  if (excerpt) {
    // 6a. 有“摘抄”,渲染带折叠和样式的区域
    dv.paragraph(`
<div style="
  border:1px solid;
  padding:8px;
  border-radius:4px;
  margin:8px 0;
">
  <div>
    <strong>📖 书籍笔记:</strong>
  </div>
  <hr style="
    border:none;
    border-top:1px dotted;
    margin:8px 0;
  ">
  <details>
    <summary style="cursor:pointer;">📋 摘抄(点击展开/收起)</summary>
    ${excerpt}
  </details>
</div>
    `);
  } else {
    // 6b. 无“摘抄”,退回到第一段逻辑:展示封面图
    dv.paragraph("读书笔记:");
    const imagePath = path.replace(/\s+/g, '%20');
    dv.paragraph(`![](${imagePath})`);
  }
})();

微信读书

let WereadPath = dv.pages(`#path`).filter(p=>String(p.file.path).includes("BookLibPath"))[0].WereadPath;
let link = dv.pages(`"${WereadPath}"`)
.filter(p=>String(p.file.name).includes("刘大猫的财富之旅")).file.path;
if(link[0])
{
	let path = link[0].replace(/\s+/g, '%20');
	dv.paragraph("![]("+path+"#高亮划线)");
}

let WereadPath = dv.pages(`#path`).filter(p=>String(p.file.path).includes("BookLibPath"))[0].WereadPath;
let link = dv.pages(`"${WereadPath}"`)
.filter(p=>String(p.file.name).includes("刘大猫的财富之旅")).file.path;
if(link[0])
{
	let path = link[0].replace(/\s+/g, '%20');
	dv.paragraph("![]("+path+"#读书笔记)");
}


let WereadPath = dv.pages(`#path`).filter(p=>String(p.file.path).includes("BookLibPath"))[0].WereadPath;
let link = dv.pages(`"${WereadPath}"`)
.filter(p=>String(p.file.name).includes("刘大猫的财富之旅")).file.path;
if(link[0])
{
	let path = link[0].replace(/\s+/g, '%20');
	dv.paragraph("![]("+path+"#本书评论)");
}

Zotero

let ZoteroPath = dv.pages(`#path`).filter(p=>String(p.file.path).includes("BookLibPath"))[0].ZoteroPath;
let link = dv.pages(`"${ZoteroPath}"`)
.filter(p=>String(p.file.name).includes("刘大猫的财富之旅")).file.path;
if(link[0])
{
	let path = link[0].replace(/\s+/g, '%20');
	dv.paragraph("![]("+path+"#Zotero链接)");
}
let ZoteroPath = dv.pages(`#path`).filter(p=>String(p.file.path).includes("BookLibPath"))[0].ZoteroPath;
let link = dv.pages(`"${ZoteroPath}"`)
.filter(p=>String(p.file.name).includes("刘大猫的财富之旅")).file.path;
if(link[0])
{
	let path = link[0].replace(/\s+/g, '%20');
	dv.paragraph("![]("+path+"#注释)");
}

🌐 其它相关